chdkfandomcom-20200222-history
User Written Scripts
Category:CHDK/uBASIC/Scripts User-written Scripts (I'm new to this Wikia thing, so bear with if I'm doing something wrong here. :-) ) Please add your debugged and tested scripts to this section. Reserve discussion and help for writing your script to the DISCUSSION section (tab above). Final scripts will appear on this page. :Scripts added here should include: :*Camera model that you wrote it on. :*Other camera models that it is known to work on. :*Any special instructions that may be required for running the script. :*Your script! :Since some scripts require special instructions that might be too lengthy to write into the script itself with "print" statements, I think it would be a good idea to start a common practice of including a short but informative text-file with each script, that could be saved by the same filename. Using a .TXT extension so the file may be referred to as a help-file using CHDK's "File Reader". I'll post one here that I tweaked/wrote to provide as an example, and for you to use as a possible template if needed. To post your own script to this main Scripts page: #Click on the [http://scratchpad.wikia.com/index.php?title=CHDK/uBASIC/Scripts&action=edit EDIT TAB] at the top of the page (not the ones beside each entry). #Scroll to the bottom of the list of scripts. #Make sure there's a horizontal-line formatting command between your script and the last script. (using the string on a line by itself) #Put the title of your script inside of the Headline Text formatting commands. This will cause it to show up in the "Contents" box at the top of the page, so people can more easily get right to your individual script. #Preface each line of your script with a character to retain orignal formatting. ---- Focus Bracketing :Written for/on: Powershot S3 IS :Also works on: (unknown at this time) : Documentation/Help (save as a small "focus-brkt.txt" file to your /SCRIPTS/ folder) ---- Put camera into Manual Focus mode. Make sure your focal distance is not too close to infinity or the nearest focus range of the camera. Meaning: allow some focus-space for the bracketing steps chosen so it won't bottom-out hitting a focus limit. Set your "Script shoot delay" to 0, 1, or 2 (depending how fast your camera can use this script). Set the number of bracketing steps you desire, keeping in mind that there will be twice this number of shots taken. 5 bracketing steps = 5-near + chosen-focus + 5-far, 11 shots in total. Step sizes of 2, 3, 4, and 5 work well. Shooting with the script: Put camera in mode. HOLD DOWN YOUR MF (manual focus) BUTTON! Press shutter release. ---- Script Code (save as "focus-brkt.bas" to your /SCRIPTS/ folder) @title Focus Bracketing (Hold MF!) @param a Number of +/- steps @default a 2 @param b Step size @default b 2 if a<1 then let a=2 if b<1 then let b=3 print "Preparing..." for n=1 to a*b click "down" next n print "Shoot 1 of", a*2+1 shoot for s=1 to a*2 for n=1 to b click "up" next n print "Shoot", s+1, "of", a*2+1 shoot next s print "Finalizing..." for n=1 to a*b click "down" next n end ----